<?php
/**
 * Created by PhpStorm.
 * User: chl
 * Date: 2017/3/21 0021
 * Time: 13:50
 */
namespace app\admin\validate;
use think\Validate;
class Integral extends Validate{
    protected $rule = [
        ['name','require|unique:integral','渠道名称不能为空|渠道名称已存在'],
        ['score','require|number|max:4','积分不能为空|积分必须是数字|积分只能在1~9999'],
    ];
    protected $scene =[
        'integralAdd' =>['name','score'],
        'integralSave' =>['name','score'],
    ];
}